set_project("learnOpenGL")
set_version("1.0.0")
set_languages("c99", "cxx17")
add_rules("mode.debug", "mode.release")

add_packagedirs("3rd/sdl/pkg")

target("glad")
  set_targetdir("bin")
  add_includedirs("3rd/glad/include/")
  set_kind("static")
  add_files("3rd/glad/src/*.c")
target_end()

target("learnOpenGL")
  set_targetdir("bin")
  add_includedirs("src/core", "3rd","3rd/glad/include")
  add_packages("SDL2")
  set_kind("binary")
  if is_os("windows") then
    add_links("OpenGL32")
  else
    add_links("OpenGL", "dl")
  end
  add_deps("glad")
  add_files("src/main.cc")
  add_files("src/**.cc")
target_end()